<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php


if(substr(decoct(fileperms(JPATH_ROOT.DS.'images'.DS.'stories'.DS.'ecard'.DS)),3)=='77')
echo "Images are stored inside ".JPATH_ROOT.DS.'images'.DS.'stories'.DS.'ecard'.DS;
else
echo JPATH_ROOT.DS.'images'.DS.'stories'.DS.'ecard'.DS." is <b>not writable</b>. Please set chomod 777";

?>
<form action="index.php" method="post" name="adminForm" id="adminForm">
<div class="col width-40">
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Details' ); ?></legend>

		<table class="admintable"  width="100%">
		<tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'A1' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="a1" id="a1" size="32" maxlength="250" value="<?php echo $this->odudecard->a1;?>" />
			</td>
		</tr>
        <tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'A2' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="a2" id="a2" size="32" maxlength="250" value="<?php echo $this->odudecard->a2;?>" />
			</td>
		</tr>
        
        <tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'A3' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="a3" id="a3" size="32" maxlength="250" value="<?php echo $this->odudecard->a3;?>" />
			</td>
		</tr>
        
        <tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'A4' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="a4" id="a4" size="32" maxlength="250" value="<?php echo $this->odudecard->a4;?>" />
			</td>
		</tr>
        
        		<tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'Card Per Row' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="card_row" id="card_row" size="32" maxlength="250" value="<?php echo $this->odudecard->card_row;?>" />
			</td>
		</tr>
		<tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'Card Per Page' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="card_page" id="card_page" size="32" maxlength="250" value="<?php echo $this->odudecard->card_page;?>" />
			</td>
		</tr>
        		<tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'From Email' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="from_email" id="from_email" size="32" maxlength="250" value="<?php echo $this->odudecard->from_email;?>" />
			</td>
		</tr>
        		<tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'From Name' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="from_name" id="from_name" size="32" maxlength="250" value="<?php echo $this->odudecard->from_name;?>" />
			</td>
		</tr>
        		<tr>
			<td width="100" align="right" class="key">
				<label for="name">
					<?php echo JText::_( 'Subject Suffix' ); ?>:
				</label>
			</td>
			<td>
				<input class="text_area" type="text" name="subject_suffix" id="subject_suffix" size="32" maxlength="250" value="<?php echo $this->odudecard->subject_suffix;?>" />
			</td>
		</tr>

	</table>
	</fieldset>
</div>
<div class="clr"></div>

<input type="hidden" name="option" value="com_odudecard" />
<!-- Hidden field cat is set as same like in primary key at table -->
<input type="hidden" name="id" value="<?php echo $this->odudecard->id; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="odudecardsetting" />
</form>
<style type="text/css">
<!--
.bar {	color: <?php echo $this->odudecard->a4?>;
	background-color: <?php echo $this->odudecard->a2?>;
	border-top-width: 1px;
	border-top-style: solid;
	border-top-color: <?php echo $this->odudecard->a3?>;
}
.menu {	border: 1px solid <?php echo $this->odudecard->a2?>;
	background-color: <?php echo $this->odudecard->a1?>;
}
-->
</style>
<div class="col width-40">
  <fieldset class="adminform" >
  <legend>Current Settings Preview</legend>

			
				<div class="menu">

				  <div class="bar" align="center">Categories</div>
				  <ul>
				    <li>Sample 1</li>
                    <li><a href="#">Sample 2</a></li>
			      </ul>
    </div>
				<p>&nbsp;</p>
  </fieldset>
            </div>